package com.georgeinfo.example.springboot2.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import com.georgeinfo.example.springboot2.service.UserService;

import javax.annotation.Resource;

/**
 * simple-springboot2
 *
 * @author George Q
 * @version 1.0.0
 * @date 2025-07-14  21:58
 */
@RestController
public class IndexController {
    @Resource
    private UserService userService;

    @GetMapping("/home") // 处理 GET 请求 /home
    public String sayHello() {
        return "Hello World:" + userService.getCurrentUser(); // 返回字符串内容
    }
}
